package skewreduce.framework.physical;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapreduce.Job;

import skewreduce.framework.EaggPlan;
import skewreduce.framework.SchedulerEvent;


public class PPigOp extends PhysicalOp {

    @Override
    public void setup(EaggPlan plan) throws IOException {
        // FIXME: get pig script from configuration
        // substitute parameters -- path
        // add jar files
    }

    public Job createJob(Configuration conf) throws IOException {
        return null;    // we don't need this
    }

    @Override
    public SchedulerEvent call() throws Exception {
        // launch pig and wait
        return new SchedulerEvent.Completion(this);
    }
}
